#include "Session.h"
#include "ClientContext.h"
#include "Packet\Packet.h"

Session::Session()
: m_nSessionID( 0 )
{

}

Session::~Session()
{

}

void Session::Init( int nSessionID, ClientContext* pClientContext )
{
	SetSessionID( nSessionID );
}

void Session::SetSessionID( int nSessionID )
{
	m_nSessionID = nSessionID;
}

void Session::SetClientContext( ClientContext* pClientContext )
{
	m_pClientContext = pClientContext;
}

bool Session::IsShowDown()
{
	if( !m_pClientContext )
		return false;

	return m_pClientContext->IsShowDown();
}

void Session::SendPacket( SendBuff* pSendBuff )
{
	if( !pSendBuff )
		return ;

	m_pClientContext->PushSendBuffer( pSendBuff );
}
